<%@ Page Language="C#" EnableViewState="false" ValidateRequest="false" AutoEventWireup="true" 
	 MasterPageFile="~/App_ThemeMasters/NoStyle/AdminOneColumnLayout.Master" Inherits="Syrinx.Gui.AspNet.Ajax.NitobiBasePage" %>
<%@ Register Assembly="Swaf.Gui.AspNet2" Namespace="Swaf.Gui.AspNet2" TagPrefix="swf" %>
<%@ Register Assembly="ScsAspNet" Namespace="Syrinx.Gui.AspNet.Ajax" TagPrefix="saj" %><%@ Register Assembly="NitobiControls" Namespace="Nitobi" TagPrefix="ntb" %>
<%@ Register Assembly="ScsAspNet" Namespace="Articles.Gui.AspNet" TagPrefix="art" %>

<!--#include file="~/SiteControls/RegisterStandardControls.txt"-->
<!--#include file="../SiteControls/StandardAdminHeaderPageContent.inc"-->
<!--#include file="../SiteControls/StandardFooterPageContent.inc"-->

<script runat="server">
	public string TitleFormat = "$company.name$ - Article Management";
</script>

<asp:Content ID="c1" ContentPlaceHolderID="title" runat="server">
	<%SecurityPrivilege = "AppFunctions.ManageArticles"; %>
	<h1 ID="_ImgCacheLibLbl" runat="server">Site Sync Management</h1>
    <swf:BizProc ID="syncBP" runat="server" FactoryName="siteSync">
		<ParentBizProc id="loginBP" />
    </swf:BizProc>
   <swf:BizProc ID="backup" runat="server" FactoryName="companyBackupRestore">
		<ParentBizProc id="syncBP" fieldName="dataOptions" dataId="current" fullDependency="True" cacheValue="false" />
   </swf:BizProc>
 </asp:Content>

<asp:Content ID="c2" ContentPlaceHolderID="trails" runat="server">

<div style="float:right">
	<table><tr><td valign="bottom">
	</td><td align="right">
        <span class="button6"><saj:ActionButton runat="server" ID="updateBtn1" Actions="syncBP.UpdateBizObj" Text="Update" /></span>
	    <span class="button1"><saj:ActionButton runat="server" ID="addBtn" Actions="syncBP.AddBizObj" Text="Add" /></span>
	    <span class="button2"><saj:ActionButton runat="server" ID="cancelBtn" Actions="syncBP.CancelEdits" Text="Cancel" /></span>
	    <span class="button5"><saj:ActionButton runat="server" ID="deleteBtn" Actions="syncBP.DeleteBizObj" Text="Delete" ClientClick="if(!confirm('Are you sure you want to delete?'))return false;"/></span>
	    <span class="button5"><saj:ActionButton runat="server" ID="syncBtn" Actions="syncBP.DoSyncNow" Text="Sync Now" ClientClick="if(!confirm('Are you sure you want to synchronize with the remote server?'))return false;"/></span>
	 </td><td>
	<div class="HelpBtnArea">
		<asp:HyperLink runat="server" ID="_pageHelp" NavigateUrl="../std/Help.aspx?helpid=SyncManagementHelp" Target="help">Help</asp:HyperLink>
	</div>
	 </td></tr></table>
	 </div>
	 <div class="clearer"></div>
</asp:Content>

<asp:Content ID="c3" ContentPlaceHolderID="mainContent" runat="server">
	<table class="adminPageWidth" ><tr><td >
    <div class="SimpleVerticalBg"> 
	    <saj:Grid ID="syncGrid" runat="server" Width="350px" Height="250px"
		    ParentBizProcIds="syncBP" Mode="LiveScrolling" Resizable="Both" ShowToolbar="false" >
		    <Columns>
			    <ntb:KeyColumn DataField="id" />
			    <ntb:BoundColumn DataField="name" HeaderText="Sync Name" width="190" />
			    <ntb:DateColumn DataField="lastGoodSync" HeaderText="Last Sync" Width="150" Mask="MM/dd/yyyy hh:mm a" />
		    </Columns>
	    </saj:Grid>
    </div>
</td><td class="adminRightContentWidth">
	<saj:NitobiBizObjDisplay runat="server" ID="syncD1" ParentBizProcIds="syncBP"
		EditableTemplate="BackupRestoreDeploy.Gui.AspNet.RemoteSyncSites">
	</saj:NitobiBizObjDisplay>
	<saj:NitobiBizObjDisplay ID="rd1" runat="server"
		TemplateNameBizRule="getBackupRestoreDeploymentOtionDisplay" ParentBizProcIds="backup" />
</td></tr></table>    
</asp:Content>
